import getApiData from "@/services/cpasRequest";

// 获取账套
export async function getAccountInfo(params: {
  dbname: string;
}) {
  const res = await getApiData("account.accountInfo.getDataList", params);
  if (res.ok) {
    return Promise.resolve({
      data: res.data,
      success: true,
    });
  }
  return Promise.reject({
    data: res.data,
    success: false,
  });
}


// account.ws.cwbbhd "account.ws.qckmhd"
export async function getDevGuidDataCwbbhd(params: {
  dbname: string; data_ID: string | number;
  wcybxs?: boolean; cpasTableName: string; bqqm_wss: string;
  bqqc_wss: string;
}) {
  const res = await getApiData('account.ws.cwbbhd', params);
  if (res.ok) {
    return Promise.resolve({
      data: res.data,
      success: true,
    });
  }
  return Promise.reject({
    data: res.data,
    success: false,
  });
}
